package mars.ns.visualisation
import mars.ns.core.Node
import mars.ns.core.Network
import mars.ns.core.LinkType
import java.awt.Color
import mars.ns.HasState

abstract class NetworkVisualizer[T <: Node](network : Network[T]) {
    
	/**
	 * Visualises the network for all nodes and all links
	 */
	def visualise
	/**
	 * Visualises the network with only the links for the given linkType
	 */
    def visualise(linkType : LinkType)
    /**
     * Stops the visualistaion
     */
    def stopVisualisation

    /**
     * Gives a node a different color
     */
    def markNode(node : Node) : Boolean

    /**
     * Gives a node the given color
     */
    def markNode(node : Node, color : Color) : Boolean
    
    /**
     * Gives a node the given name
     */
    def setNodeName(node : Node, name : String) : Boolean
    
    /**
     * Adds a node to the visualisation if it's not already added
     * @return	True if success
     */
    def addNode(node : Node) : Boolean
    
    /**
     * @return True if node is removed with success
     */
    def removeNode(node : Node) : Boolean
    
    /**
     *	Adds an edge to the visualizer
     */
    def addEdge(from : Node, to : Node, edgeLinkType : LinkType) : Boolean 
    /**
     * removes a link from the visualisation
     */
    def removeEdge(from : Node, to : Node, edgeLinkType : LinkType) : Boolean
}